<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>EasyBuy后台管理</title>
    <!--<link rel="stylesheet" href="${pageContext.request.contextPath}/layui/css/layui.css">-->
    <!--<script src="${pageContext.request.contextPath}/layui/layui.js"></script>-->
    <link rel="stylesheet" href="../../../lib/layui/css/layui.css">
    <script src="../../../lib/layui/layui.js"></script>
</head>
<body>
<div class="layui-fluid">
	<div class="layui-row">
		<fieldset class="layui-elem-field layui-field-title">
			<legend>管理首页</legend>
		</fieldset>
	</div>
	<hr class="layui-bg-red">

	<!--按钮及查询框组-->
	<div class="layui-row">
		<div class="layui-col-md-offset2">
			<div class="layui-inline">
				<input class="layui-input" name="id" autocomplete="off" placeholder="新闻编号">
			</div>
			<div class="layui-inline">
				<input class="layui-input" name="news" autocomplete="off" placeholder="新闻标题">
			</div>
			<div class="layui-inline">
				<input class="layui-input" name="content" autocomplete="off" placeholder="内容">
			</div>
			<button class="layui-btn layuiadmin-btn-admin" lay-submit="" lay-filter="LAY-user-back-search">
				<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
			</button>
		</div>
	</div>
	<hr>
<div class="layui-btn-group">
	<button class="layui-btn layui-btn-danger" onclick="delAll()"><i class="layui-icon"></i>批量删除</button>
	<a class="layui-btn" href="news-edit.html">添加</a>
	</div>
	<!--表格-->
	<table class="layui-hide" id="gitLogs"></table>

	<script type="text/html" id="lineBar">
		<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
		<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
		<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
	</script>
</div>
<script>
	/*配置表格内容，以及加载数据*/
    layui.use('table', function () {
        var table = layui.table;

        table.render({
            elem: '#gitLogs'
            , url: 'user.json'
            , cellMinWidth: 80
            , cols: [[
                {checkbox: true, field: 'id', title: 'ID'}
                , {field: 'news', title: '新闻标题'}
                , {field: 'content', title: '新闻内容'}
                , {field: 'time', title: '创建时间'}
                , {fixed: 'right', toolbar: '#lineBar', width: 200, align: 'center'}
            ]]
            , page:{
                layout: ['limit', 'count', 'prev', 'page', 'next', 'skip']
                ,groups: 5
            }
        });
    });
</script>
</body>
</html>